antlr3StringStreamNew string input error [ at offset 0, at <EOF> : cannot match to any predicted input... ]

Posted by Embeguru on Stack Overflow See other posts from Stack Overflow or by Embeguru
Published on 2012-03-15T10:11:27Z Indexed on 2012/03/20 17:29 UTC
Read the original article Hit count: 473

Filed under:

I'm using ANTLR 3.4 with simplecTreeParser example and want to give string input from main.c

I'v modified input in main as mentioned bellow

pANTLR3_UINT8 input_string = (pANTLR3_UINT8)"int a;";

input = antlr3StringStreamNew(input_string, ANTLR3_ENC_8BIT, sizeof(input_string),(pANTLR3_UINT8)"ABCD");

Apparently getting following error

-end of input-(1) : error 3 : 23:1: declaration : ( variable | functionHeader ';' -> ^( FUNC_DECL functionHeader ) | functionHeader block -> ^( FUNC_DEF functionHeader block ) );, at offset 0, at : cannot match to any predicted input... The parser returned 1 errors, tree walking aborted.

Any other way to give String input

Regards

© Stack Overflow or respective owner

Related posts about antlr3